<!--{include header}-->

<div id="bdw" class="bdw">
<div id="bd" class="cf">
	<div id="deal-default">
		<div id="content">
			<div id="deal-intro" class="cf">
                <h1 style="padding-left:0;">商户：{$partner['title']}</h1>
                <div class="main">
					<div class="other other-top" style="margin-top:5px;">
						<p><b>地址</b>：{$partner['address']}</p>
						<p><b>电话</b>：{$partner['phone']}</p>
					<!--{if $partner['homepage']}-->
						<p><b>网址</b>：<a href="{$partner['homepage']}" target="_blank">${domainit($partner['homepage'])}</a></p>
					<!--{/if}-->
					</div>					
					<div class="other">
					<!-- {if $partner['guarantee'] == 'Y'} -->
					<p class="e_icon ensure"><a href="/help/guarantee.php" target="_blank" title="更低廉的价格，更优质的服务！消费保障计划全面推出！">团员消费保障</a></p>
					<!-- {/if} -->
					</div>
					<div class="partner_team_info">
						<p>组织 <b>{$team_count}</b> 次团购</p>
						<p>购买 <b>{$join_number}</b> 人次</p>
						<p>节省 <b>${moneyit($save_number)}</b> 元</p>
						<p id="partner-btn">
							<span class="h-comment">
								<!-- {if $comments_num>0} -->
								${number_format(100*$partner['comment_good']/$comments_num,2)}%
								<!-- {else} -->
								--%
								<!-- {/if} -->
							</span>
							<span class="partner-comment-btn">
								<a id="partner-comment-btn" href="/order/index.php?s=pay"><strong>消费点评</strong></a>
							</span>
						</p>
						<div class="partner-dianping">
							<p style="line-height:24px;">
							共 <strong>{$comments_num}</strong> 条点评：
							</p>
							<p><img src="/static/css/i/comment-icon-A.gif" alt="" />&nbsp;<span>满意:</span>{$grades['A']}</p>
							<p><img src="/static/css/i/comment-icon-P.gif" alt="" />&nbsp;<span>一般:</span>{$grades['P']}</p>
							<p><img src="/static/css/i/comment-icon-F.gif" alt="" />&nbsp;<span>失望:</span>{$grades['F']}</p>
						</div>
					</div>
				</div>
                <div class="side" style="_padding-left:5px;">
                    <div class="deal-buy-cover-img" id="team_images">
					<!--{if $partner['image1']||$partner['image2']}-->
						<div class="mid">
							<ul>
								<li class="first"><img src="${team_image($partner['image'])}"/></li>
							<!--{if $partner['image1']}-->
								<li><img src="${team_image($partner['image1'])}"/></li>
							<!--{/if}-->
							<!--{if $partner['image2']}-->
								<li><img src="${team_image($partner['image2'])}"/></li>
							<!--{/if}-->
							</ul>
							<div id="img_list">
								<a ref="1" class="active">1</a>
							<!--${$imageindex=1;}-->
							<!--{if $partner['image1']}-->
								<a ref="${++$imageindex}" >{$imageindex}</a>
							<!--{/if}-->
							<!--{if $partner['image2']}-->
								<a ref="${++$imageindex}" >{$imageindex}</a>
							<!--{/if}-->
							</div> 
						</div>
						<!--{else}-->
							<img src="${team_image($partner['image'])}" width="440" height="280" />							
						<!--{/if}-->
					</div>
					<div class="review partner-detil">
							<p>{$partner['other']}</p>
					</div>
                </div>
            </div>
            <input type="hidden" name="partner-availablecoupons" value="${count($coupons)}" />
            <input type="hidden" name="partner-id" value="{$partner['id']}" />
            <div id="recent-deals" class="cf" style="margin-top:15px;">
			<div id="dashboard" class="dashboard">
				<ul>
				<li class="${$view == 'comment'?'current':''}"><a class="" href="/partner.php?id={$partner['id']}&view=comment#comments" id="comments">全部点评</a><span></span></li>
				<li class="${$view == 'team'?'current':''}"><a class="" href="/partner.php?id={$partner['id']}&view=team#teams" id="teams">团购项目</a><span></span></li>
				</ul>
			</div>
			<div id="partner-content" style="margin-left:0px; margin-right:0px;" page="{$focus}">
				<!--团购-->
				<!-- {if $view=='team'} -->
				<div class="box">
					<div class="box-top"></div>
					<div class="box-content">
						<div class="sect" style="border-top:1px solid #fff">
							<ul class="deals-list">
							<!-- {if empty($teams)} -->
							当前商家还未举行过团购活动
							<!-- {else} -->
							<!--{loop $teams $index $one}-->
								<li class="${$index++%2?'alt':''} ${$index<=2?'first':''}">
									<p class="time">${date('Y年n月j日', $one['begin_time'])}</p>
									<h4><a href="/team.php?id={$one['id']}" title="{$one['title']}" target="_blank">${mb_strimwidth($one['title'],0,86,'...')}</a></h4>
									<div class="pic">
										<div class="{$one['picclass']}"></div>
										<a href="/team.php?id={$one['id']}" title="{$one['title']}" target="_blank"><img alt="{$one['title']}" src="${team_image($one['image'])}" width="200" height="121" align="middle" /></a>
									</div>
									<div class="info"><p class="total"><strong class="count">{$one['now_number']}</strong>人购买</p><p class="price">原价：<strong class="old"><span class="money">{$currency}</span>${moneyit($one['market_price'])}</strong><br />折扣：<strong class="discount">${team_discount($one)}折</strong><br />现价：<strong><span class="money">{$currency}</span>${moneyit($one['team_price'])}</strong><br />节省：<strong><span class="money">{$currency}</span>${moneyit($one['market_price']-$one['team_price'])}</strong><br /></p></div>
								</li>
							<!--{/loop}-->
							<!-- {/if} -->
							</ul>
							<div class="clear"></div>
							<div>{$pagestring}</div>
						</div>
					</div>
					<div class="box-bottom"></div>
				</div>				
				<!--点评-->
				<!-- {else} -->
				<div class="box">
					<div class="box-top"></div>
					<div class="box-content">
						<div class="sect" style="border-top:1px solid #fff">
							<div id="partner-comment-box">
							<!-- {if empty($comments)} -->
							还没有用户对当前商家做出点评。
							<!-- {else} -->
							<!-- {loop $comments $k $v} -->												
							<div class="partner-comment-box-avatar"><a name="comment-{$v['id']}"><img src="${user_image($users[$v['user_id']]['avatar'])}" /></a></div>
							<div class="partner-comment-box-cont">
								<ul>
									<li class="comment-name"><a>{$users[$v['user_id']]['username']}</a></li>
									<li class="comment-text">{$v['comment']}</li>
									<li class="comment-misc">
										<img src="/static/css/i/comment-icon-{$v['grade']}.gif" alt="" />&nbsp;
										<!-- {if $v['grade'] == 'A'} -->
										 满意
										<!-- {elseif $v['grade'] == 'P'} -->
										一般
										<!-- {elseif $v['grade'] == 'F'} -->
										失望 
										<!-- {/if} -->
										<span class="comment-time">&nbsp;[${date('Y-m-d H:i:s',$v['create_time'])}]
										<!-- {if $manger} -->
										[<a class="ajaxlink" href="/ajax/comment.php?action=recommend&id={$v['id']}">推荐</a>]
										<!-- {/if} -->
										</span>
									</li>
								</ul>
							</div>
							<!-- {/loop} -->
							<!-- {/if} -->
							</div>							
							<div class="clear"></div>
							<div>{$pagestring}</div>
						</div>
					</div>
					<div class="box-bottom"></div>
				</div>	
				<!-- {/if} -->		
				<!-- {if empty($coupons)} -->				
				<div id="partner-tip-bottom">
					点评功能目前只对参与过该商家产品团购的团员开放，谢谢您的支持！<br/>
					<!-- {if !$login_user} -->
					您尚未登录，请先 <a href="/account/login.php">登录</a> 或 <a href="/account/signup.php">注册</a> 。
					<!-- {/if} -->
				</div>
				<!-- {/if} -->
            </div>
		</div>
    </div>
    <div id="sidebar">
	<!--{include block_side_others}-->
	</div>
</div>
</div> <!-- bd end -->
</div> <!-- bdw end -->

<!--{include footer}-->
